package com.xnyzc.lhy.common.penum.billRules;

/**
 * @Description 驶出当前城市是否收取时间费
 * @Author zhuyubin
 * @Date 2019-09-01 12:50
 **/
public enum EIsGather {

    no(0, "不收"), yes(1, "收");
    private int type;
    private String typeName;

    EIsGather(int type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    /**
     * 查询性别
     * @param type
     * @return
     */
    public static EIsGather findType(Integer type) {
        EIsGather eIsGather;
        switch (type) {
            case 0:
                eIsGather = EIsGather.no;
                break;
            case 1:
                eIsGather = EIsGather.yes;
                break;
            default:
                throw new IllegalArgumentException("未设置");
        }
        return eIsGather;
    }

    public int getType() {
        return this.type;
    }

    public String getTypeName() {
        return typeName;
    }
}
